package com.ruoyi.project.im.utils;

import java.util.Date;
import java.util.Random;

public class RandomNum {

    public static String  randomEn(int i){
        String str="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        StringBuilder sb =new StringBuilder(i);
        for (int j = 0; j < i; j++) {
            char ch=str.charAt(new Random().nextInt(62));
            sb.append(ch);
        }
        return sb.toString();
    }


    public static String  randomxiaoxie(int i){
        String str="abcdefghijklmnopqrstuvwxyz0123456789";
        StringBuilder sb =new StringBuilder(i);
        for (int j = 0; j < i; j++) {
            char ch=str.charAt(new Random().nextInt(36));
            sb.append(ch);
        }
        return sb.toString();
    }

    public static String  randomdaxie(int i){
        String str="ABCDEFGHIJKLMNOPQRSTUVWXYZ";
        StringBuilder sb =new StringBuilder(i);
        for (int j = 0; j < i; j++) {
            char ch=str.charAt(new Random().nextInt(26));
            sb.append(ch);
        }
        return sb.toString();
    }


    public static String getOperationID() {
        Date date = new Date();
        return date.getTime()+"";
    }
}
